package finman.database;

class Schet {
	private String number;
	private Valuta valuta;
	private double balance;
	
	Schet(String number, Valuta valulta, double balance) {
		this.number = number;
		this.valuta = valuta;
		this.balance = balance;
	}
	
	public int compareNumberTo(String anotherNumber) {
		// comparing 2 account numbers
		return number.compareTo(anotherNumber);
	}
	/**
	 * @param someNumber Pass -null- to retrieve the first
	 * possible value of account number.
	 */
	public static String getNextAccountNumber(String someNumber) {
		final String firstAccountNumber = "26030320036200";
		if(someNumber == null) return firstAccountNumber;
		Long number = Long.parseLong(someNumber);
		number = number + 1;
		return number.toString();
	}
	
	////////////////////// ACCESSORS \\\\\\\\\\\\\\\\\\\\\\\\\\	
	public String getNumber() {
		return new String(number);
	}		
}